/*
 * @description: 全局配置
 * @Author: Islands
 * @Date: 2024-06-17 09:50:53
 * @LastEditTime: 2024-06-21 22:00:49
 */
import { defineStore } from 'pinia';
import { ILanguage } from '@/layouts/Widgets/index.d'
import bg from "@/assets/image/theme/bg3.jpg";
import { ThemeNameEnum,defaultEnum } from '@/constant/theme';

export const configStore = defineStore('config', {
    state: () => {
        return {
            systemLogo: {
                image: 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
                zhName: 'XX 管理系统',
                enName: 'xx guan li xi tong',
            } as any,
            Language: {
                label: "中文简体",
                value: "zhCN",
                icon: "zhongwen",
            } as ILanguage,
            Widgets: {
                color: ['#409eff', '#67c23a', '#e6a23c', '#f56c6c','#909399'],
                layout: ThemeNameEnum.layout01,
                bgImage: bg,
                anime: [defaultEnum.animePrimary, defaultEnum.animeChild],
                tab: {
                    hide: true,
                    height: 30,
                    style: 'default'
                },
                asideWidth: 220,
                headerHeight: 30,
                footer: {
                    hide: true,
                    height: 40,
                }
            },
        }
    },
    getters: {
        getLogo: (state) => {
            return state.systemLogo;
        },
    },
    actions: {

    },
    persist: {
        storage: localStorage
    }
})